<template>
  <div class="pages">
    <router-view/>
  </div>
</template>

<script>

export default {
  name: 'BasePages',
  props: ["baseData"],
  data() {
    return {
      
    };
  },
  watch: {
    'baseData.activeKey'(newVal) {
      const panes = this.baseData.panes.filter(pane => pane.key == newVal);
      if (panes.length == 1) {
        let item = panes[0]
        this.$router.push({ path:item.path })
      }
    },
  },
  methods: {
    
  },
}
</script>

<style lang="less" scoped>
  .pages {
    height: calc(~'100vh - 108px');
    // background-color: #f0f2f5;
  }
</style>
